<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	>
	<ui:define name="content">
	
		<h:link value="Registrovat" outcome="create-user" />
	
		<ui:include src="/includes/menu.xhtml"></ui:include>
		
		<!-- <h:form>
		<rich:dataTable value="#{mainPageBean.fragments}" var="fragment">
			<rich:column>
				<f:facet name="header">
					<h:outputText value="id" />
				</f:facet>			
				<h:outputText value="#{fragment.id}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="fragment" />
				</f:facet>	
				<h:link value="#{fragment.title}" includeViewParams="true" outcome="fragment">
				    <f:param name="fragment" value="#{fragment.id}"/>
				</h:link>
			</rich:column>		
		</rich:dataTable>
		</h:form> -->
		
		<a4j:outputPanel id="panel" layout="block">
                <a4j:repeat value="#{mainPageBean.fragments}" var="fragment" rows="20" id="repeat">
                    <rich:panel style="float:left; width:200px; padding:5px;">
                        <f:facet name="header">
                            <h:panelGroup>
                             	<h:panelGrid columns="2">
	                                <h:outputText value="#{fragment.id} : " />
	                                <h:link value="#{fragment.title}" includeViewParams="true" outcome="fragment">
									    <f:param name="fragment" value="#{fragment.id}"/>
									</h:link>
                        		</h:panelGrid>
                            </h:panelGroup>
                        </f:facet>
                        <h:panelGrid columns="1">
                            <h:outputText value="#{fragment.description}" />
                        </h:panelGrid>
                    </rich:panel>
                </a4j:repeat>
            </a4j:outputPanel>
		
	</ui:define>
</ui:composition>
